<ul>
    <li v-for="td in datas">
        <div :data-deptId="td.deptId" class="w100 ivueUlBox ivuTr">
            <div :style="{ width: '30%'}" class="ivu-table-cell">
                <span v-if="td.subDeptList && typeof td.subDeptList !== 'string' && td.subDeptList.length > 0" @click="showNext($event)"><Icon type="chevron-right"></Icon></span>
                <span v-else="!td.subDeptList || typeof td.subDeptList === 'string' || td.subDeptList.length === 0"></span>
                <span :title="td.name">{{td.name}}</span>
            </div>
            <div style="width: 30%;" class="ivu-table-cell"><span :title="td.code">{{td.code}}</span></div>
            <div style="width: 20%;" class="ivu-table-cell"><span :title="td.createTime">{{td.createTime | formatDate}}</span></div>
            <div style="width: 20%;" class="ivu-table-cell">
                <div>
                    <button @click="editorDept(td,$event)" type="button" class="ivu-btn ivu-btn-text ivu-btn-small">
                        <span>编辑</span>
                    </button>
                    <button @click="deleteDept(td.deptId,td.name)" type="button" class="ivu-btn ivu-btn-text ivu-btn-small">
                        <span>删除</span>
                    </button>
                </div>
            </div>
        </div>
        <div v-if="td.subDeptList && typeof td.subDeptList !== 'string' && td.subDeptList.length > 0" class="w100 ivueUlBox">
            <department-table :datas="td.subDeptList"></department-table>
        </div>
    </li>
</ul>